//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package objects;

import common.GlobalID;

import java.util.Iterator;
import java.util.LinkedHashMap;

public class ProductionsGoodEntry implements IEntryToSellOrBuy, IUnlockLevel, IGlobalIDName {
   private final LinkedHashMap<String, Integer> requirements = new LinkedHashMap();
   private final String Name;
   private final Integer TimeMin;
   private final Integer DumbValue;
   private final String ProcessingBuilding;
   private final Integer UnlockLevel;
   private final Integer DiamondPrice;
   private final Integer ExpCollect;
   private Integer Instance;

   public ProductionsGoodEntry(String Name, Integer TimeMin, Integer DumbValue, String ProcessingBuilding, Integer UnlockLevel, Integer DiamondPrice, Integer ExpCollect) {
      this.Name = Name;
      this.TimeMin = TimeMin;
      this.DumbValue = DumbValue;
      this.ProcessingBuilding = ProcessingBuilding;
      this.UnlockLevel = UnlockLevel;
      this.DiamondPrice = DiamondPrice;
      this.ExpCollect = ExpCollect;
   }

   public String getName() {
      return this.Name;
   }

   public Integer getPruduceTime() {
      return Integer.valueOf(this.TimeMin.intValue() * 60);
   }

   public Integer getDefaultPrice() {
      return this.DumbValue;
   }

   public String getProcessingBuilding() {
      return this.ProcessingBuilding;
   }

   public Integer getUnlockLevel() {
      return this.UnlockLevel;
   }

   public Integer getDiamondPrice() {
      return this.DiamondPrice;
   }

   public void setInstance(int val) {
      this.Instance = Integer.valueOf(val);
   }

   public Integer getInstance() {
      return this.Instance;
   }

   public Integer getGlobalID(Integer objectClass) {
      return Integer.valueOf(GlobalID.create(objectClass.intValue(), this.Instance.intValue()));
   }

   public void addRequirement(String Requirement, Integer RequirementAmount) {
      this.requirements.put(Requirement, RequirementAmount);
   }

   public LinkedHashMap<String, Integer> getRequirements() {
      return this.requirements;
   }

   public Integer getExpCollect() {
      return this.ExpCollect;
   }

   public String toString() {
      String rstr = new String();

      String rq;
      for(Iterator var3 = this.requirements.keySet().iterator(); var3.hasNext(); rstr = rstr + rq + "(" + this.requirements.get(rq) + ") ") {
         rq = (String)var3.next();
      }

      return this.Name + ": Requirements: [ " + rstr + "] TimeMin:" + this.TimeMin + " Dumb Price:" + this.DumbValue;
   }
}
